home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / apps / InterfaceBuilder.h next >
Text File  |  1994-03-29  |  6KB  |  206 lines

  1. /* InterfaceBuilder - InterfaceBuilder.h - Jean-Marie Hullot
  2.  * (c) 1991 NeXT Computer Inc.
  3.  */
  4. #import <appkit/appkit.h>
  5.  
  6. @class Sound;
  7.  
  8. /* InterfaceBuilder Pasteboard types */
  9.  
  10. extern NXAtom IBObjectPboardType;
  11. extern NXAtom IBCellPboardType;
  12. extern NXAtom IBMenuPboardType;
  13. extern NXAtom IBMenuCellPboardType;
  14. extern NXAtom IBViewPboardType;
  15. extern NXAtom IBWindowPboardType;
  16.  
  17. @protocol IB
  18.     /* Accessing the document. */
  19. - activeDocument;
  20.     /* Accessing the selection owner. */
  21. - selectionOwner;
  22.     /* Managing connections.  The following might be useful when
  23.      * implementing your own ConnectionInspector. */
  24. - connectSource;
  25. - connectDestination;
  26. - (BOOL)isConnecting;
  27. - stopConnecting;
  28. - displayConnectionBetween:source and:destination;
  29.     /* Querying the mode. */
  30. - (BOOL)isTestingInterface;
  31.     /* Registering controllers. */
  32. - registerDocumentController:aController;
  33. - unregisterDocumentController:aController;
  34.     /* Updater.  Not supported as public API in Release 3. */
  35. - disableUpdate;
  36. - reenableUpdate;
  37. @end
  38.  
  39. @protocol IBConnectors
  40. - free;
  41. - source;
  42. - destination;
  43. - establishConnection;
  44. - nibInstantiate;
  45. - renewObject:old to:new;
  46. - read:(NXTypedStream *)stream;
  47. - write:(NXTypedStream *)stream;
  48. @end
  49.  
  50. @protocol IBDocumentControllers
  51. - didOpenDocument:theDocument;
  52. - willSaveDocument:theDocument;
  53. - didSaveDocument:theDocument;
  54. @end
  55.  
  56. @protocol IBDocuments
  57.     /* Managing the document. */
  58. - touch;
  59. - getDocumentPathIn:(char *)thePath;
  60.     /* Managing the document hierarchy. */
  61. - attachObject:anObject to:parent;
  62. - attachObjects:(List *)objectList to:parent;
  63. - deleteObject:anObject;
  64. - deleteObjects:(List *)objectList;
  65. - copyObject:anObject type:(NXAtom)type inPasteboard:(Pasteboard *)aPasteboard;
  66. - copyObjects:(List *)objectList type:(NXAtom)type
  67.     inPasteboard:(Pasteboard *)aPasteboard;
  68. - (List *)pasteType:(NXAtom)type fromPasteboard:(Pasteboard *)aPasteboard
  69.     parent:theParent;
  70. - (BOOL)objectIsMember:anObject; 
  71. - getObjects:(List *)objectList;
  72. - getParentForObject:anObject;
  73.     /* Setting object names. */
  74. - (BOOL)setName:(const char *)name for:anObject;
  75. - getNameIn:(char *)buffer for:anObject;
  76.     /* Managing connectors. */
  77. - addConnector:aConnector;
  78. - removeConnector:aConnector;
  79. - listConnectors:(List *)aList forSource:aSource;
  80. - listConnectors:(List *)aList forDestination:aDestination;
  81. - listConnectors:(List *)aList forSource:aSource filterClass:aClass;
  82. - listConnectors:(List *)aList forDestination:aDestination filterClass:aClass;
  83.     /* Managing editors. */
  84. - setSelectionFrom:anEditor;
  85. - editorDidClose:anEditor for:anObject;
  86. - getEditor:(BOOL)createIt for:anObject;
  87. - openEditorFor:anObject;
  88.     /* Updating the display. */
  89. - redrawObject:anObject;
  90. @end
  91.  
  92. @protocol IBSelectionOwners
  93. - (unsigned int)selectionCount; 
  94. - getSelectionInto:(List *)objectList;
  95. - redrawSelection;
  96. @end
  97.  
  98. @protocol IBEditors <IBSelectionOwners>
  99.     /* Initializing. */
  100. - initWith:anObject inDocument:aDocument;
  101.     /* Identifying objects. */
  102. - document;
  103. - editedObject;
  104. - window;
  105.     /* Displaying objects. */
  106. - resetObject:anObject;
  107.     /* Managing the selection. */
  108. - (BOOL) wantsSelection;
  109. - selectObjects:(List *)objectList;
  110. - makeSelectionVisible:(BOOL)showIt;
  111.     /* Copying and pasting objects. */
  112. - (BOOL)copySelection;
  113. - (BOOL)deleteSelection;
  114. - (BOOL)pasteInSelection;
  115. - (NXAtom)acceptsTypeFrom:(const NXAtom *)typeList;
  116.     /* Opening and closing editors. */
  117. - close;
  118. - openSubeditorFor:anObject;
  119. - closeSubeditors;
  120.     /* Activating the editor. */
  121. - orderFront;
  122. - (BOOL)activate;
  123. @end
  124.  
  125. @protocol IBInspectors
  126. /* Returns a boolean value indicating whether the inspector object requires
  127.  * Interface Builder to display the OK and Revert buttons in the Inspector
  128.  * panel. */
  129. - (BOOL)wantsButtons;
  130.  
  131. /* Interface Builder sends this message to the inspector object whenever
  132.  * the inspector's display might need to be updated.  Your inspector must
  133.  * implement this method, and it must send the same message to `super' as
  134.  * part of its implementation. */
  135. - revert:sender;
  136.  
  137. /* Implement in your inspector to commit the changes that the user makes in
  138.  * the Inspector panel.  Your implementation of this method must send the
  139.  * same message to `super'. */
  140. - ok:sender;
  141. @end
  142.  
  143. @interface Object (IBObject)
  144. - (const char *)getInspectorClassName;
  145. - (const char *)getConnectInspectorClassName;
  146. - (const char *)getSizeInspectorClassName;
  147. - (const char *)getHelpInspectorClassName;
  148. - (const char *)getEditorClassName;
  149. - (NXImage *)getIBImage;
  150. @end
  151.  
  152. @interface View (IBView)
  153. #define IB_BOTTOMLEFT    0
  154. #define IB_MIDDLELEFT     1
  155. #define IB_TOPLEFT     2
  156. #define IB_MIDDLETOP    3
  157. #define IB_TOPRIGHT    4
  158. #define IB_MIDDLERIGHT    5
  159. #define IB_BOTTOMRIGHT    6
  160. #define IB_MIDDLEBOTTOM    7
  161. - getMinSize:(NXSize *)minSize maxSize:(NXSize *)maxSize from:(int)where;
  162. - placeView:(NXRect *)frameRect;
  163.     /* The default implementation sends `setFrame:'. */
  164. @end
  165.  
  166. @interface IBInspector:Object <IBInspectors>
  167. {
  168.     id object;
  169.     id window;
  170.     id driver;        /* private! */
  171.     id okButton;
  172.     id revertButton;
  173. }
  174. - object;
  175. - window;
  176. - touch:sender;
  177. - textDidChange:sender;
  178. - updateFor:(int)changeMask;    /* Not supported as public API in Release 3 */ 
  179. @end
  180.  
  181. @interface IBPalette:Object
  182. {
  183.     id paletteDocument;
  184.     id originalWindow;
  185.     id paletteView;
  186.     id draggedView;
  187.     id paletteInfo;    /* private! */
  188. }
  189. /* Associating views and objects. */
  190. - associateObject:object type:(NXAtom)type with:aView;
  191. /* Initializing the palette. */
  192. - finishInstantiate;
  193. /* Accessing related objects. */
  194. - paletteDocument;
  195. - originalWindow;
  196. - findImageNamed:(const char *)name;
  197.  
  198. /* Private API. */
  199. - paletteView;            /* Not supported as public API in Release 3. */
  200. - draggedView;            /* Not supported as public API in Release 3. */
  201. - declareTypesFor:aView inPasteboard:(Pasteboard *)aPasteboard;
  202.                 /* Not supported as public API in Release 3. */
  203. - pasteboard:aPasteboard provideData:(NXAtom)type;
  204.                 /* Not supported as public API in Release 3. */
  205. @end
  206.